package com.example.zg.learn.enties;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 创建日期:2019/1/18 on 16:37
 * 描述：读者
 * 作者: zhougan
 */
public class Reader implements Parcelable{
    private String name;

    public Reader(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected Reader(Parcel in) {
        name = in.readString();
    }

    public static final Creator<Reader> CREATOR = new Creator<Reader>() {
        @Override
        public Reader createFromParcel(Parcel in) {
            return new Reader(in);
        }

        @Override
        public Reader[] newArray(int size) {
            return new Reader[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
    }
}
